<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('Banner/index')}">轮播图列表</a></li>
        <li><a href="{:url('Banner/add')}">添加轮播图</a></li>
    </ul>
    <form class="js-ajax-form" action="{:url('Banner/listOrder')}" method="post">
        <div class="table-actions">
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit">{:lang('SORT')}</button>
        </div>
        <table class="table table-hover table-bordered table-list" id="menus-table">
            <thead>
            <tr>
                <th width="80">{:lang('SORT')}</th>
                <th width="50">ID</th>
                <th>图片</th>
                <th>跳转地址</th>
                <th>{:lang('STATUS')}</th>
                <th>创建时间</th>
                <th>修改时间</th>
                <th width="180">{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="banner" item="v">
                <tr>
                    <td>
                        <input name="list_orders[{$v.id}]" type="text" size="3" value="{$v.list_order}" class="input input-order" style="width: 50px;">
                    </td>
                    <td>{$v.id}</td>
                    <td><img src="/upload/{$v.image}" alt="" width="50" class="js-image-previewer"></td>
                    <td>{$v.url}</td>
                    <td>
                        <eq name="v.status" value="1">
                            <span class="label label-success">显示</span>
                        <else/>
                            <span class="label label-warning">隐藏</span>
                        </eq>
                    </td>
                    <td>{$v.create_time}</td>
                    <td>{$v.update_time}</td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('Banner/edit', ['id' => $v.id])}">编辑</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Banner/softDelete', ['id' => $v.id])}">删除</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">

        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
<script src="__STATIC__/js/js-image-previewer.js"></script>
</body>
</html>
